// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'

import store from './vuex/store'
import Vuex from 'vuex'
Vue.use(Vuex);

//BootstrapVue UI
import BootstrapVue from 'bootstrap-vue'
import 'bootstrap/dist/css/bootstrap.css'
import 'bootstrap-vue/dist/bootstrap-vue.css'
Vue.use(BootstrapVue)

//样式
import '@/fonts/font.scss'
import '@/styles/index.scss'

import VueI18n from 'vue-i18n'
import messages from '@/lang/index'
Vue.use(VueI18n)

//swiper滑动组件
import VueAwesomeSwiper from 'vue-awesome-swiper'
import 'swiper/dist/css/swiper.css' 
Vue.use(VueAwesomeSwiper)

Vue.config.productionTip = false

const localLang = window.localStorage.getItem('user_lang')?window.localStorage.getItem('user_lang'):'en'

const i18n = new VueI18n({
	//定义默认语言
	locale: localLang,
	messages
})

/* eslint-disable no-new */
window.vueVm = new Vue({
	components: { App },
	router,
	i18n,
	store,
	Vuex:store.commit('CHANGE_LANG',localLang),
	template: '<App/>'
}).$mount('#app')
